home *** CD-ROM | disk | FTP | other *** search
-
- (*
- TITLE: Turbo Pascal MicroSoft Mouse Library Unit;
- FILENAME: MOUSELIB.PAS;
- REQUIRES: MOUSELIB.ASM;
- COMPILER: Turbo Pascal V.4.0+;
- ASSEMBLER: TASM V.2.0;
-
- *)
-
- { Int 33h ($CD $33) Functions }
-
- Unit MouseLib;
-
- (**********************************************************
- INTERFACE
- **********************************************************)
-
- Interface
-
- Const
- LEFT_BUTTON = 1;
- RIGHT_BUTTON = 2;
- BOTH_BUTTONS = 3;
-
- LeftMouseButton : Integer = 0;
- RightMouseButton : Integer = 1;
-
- Function mouse_reset(Var num_buttons : Integer) : Integer;
- { Func 00h }
-
- Procedure mouse_show;
- { Func 01h }
-
- Procedure mouse_hide;
- { Func 02h }
-
- Function mouse_get_pos(Var x, y : Integer) : Integer;
- { Func 03h }
-
- Procedure mouse_set_pos(x, y : Integer);
- { Func 04h }
-
- Function mouse_button_press
- (Var x, y, count : Integer; button : Integer) : Integer;
- { Func 05h }
-
- Function mouse_button_rel
- (Var x, y, count : Integer; button : Integer) : Integer;
- { Func 06h }
-
- Procedure mouse_limit_x(min_x, max_x : Integer); { Func 07h }
-
- Procedure mouse_limit_y(min_y, max_y : Integer); { Func 08h }
-
- Procedure mouse_set_graphcursor(xspot, yspot : Integer; masks : pointer);
- { Func 09h }
-
-
- Procedure mouse_set_textcursor(cursor_type, scr_mask, curs_mask : Integer);
- { Func 0Ah }
-
- Procedure mouse_get_movement(Var x, y : Integer);
- { 0Bh }
-
- Procedure mouse_set_eventhandler(event_mask : Integer; mhandler : pointer);
- { Func 0Ch }
-
- Procedure mouse_start_pen_emul;
- { Func 0Dh }
-
- Procedure mouse_stop_pen_emul;
- { Func 0Eh }
-
-
- Procedure mouse_set_movement_ratio(x_ratio, y_ratio : Integer);
- { Func 0Fh }
-
-
- Procedure mouse_conditional_off(left, top, right, bottom : Integer);
- { Func 10h }
-
- Procedure mouse_set_speed(threshold : Integer);
- { Func 13h }
-
-
- Function mouse_swap_vector
- (new_mask : Integer; Var old_mask : Integer; new_vector : pointer) : pointer;
- { Func 14h }
-
- Function mouse_get_bufsize : Integer;
- { Func 15h }
-
- Procedure mouse_save_state(state_buf : pointer);
- { Func 16h }
-
- Procedure mouse_restore_state(state_buf : pointer);
- { Func 17h }
-
-
- Procedure mouse_set_alt_handler(alt_mask : Integer; func : pointer);
- { Func 18h }
-
-
- Function mouse_get_alt_handler
- (alt_mask : Integer; handler : pointer) : pointer;
- { Func 19h }
-
-
- Procedure mouse_set_sens(x_ratio, y_ratio, threshold : Integer);
- { Func 1Ah }
-
-
- Procedure mouse_get_sens(Var x_ratio, y_ratio, threshold : Integer);
- { Func 1Bh }
-
- Procedure mouse_set_crt_page(crt_page : Integer);
- { Func 1Dh }
-
- Function mouse_get_crt_page : Integer;
- { Func 1Eh }
-
-
- Function mouse_disable_drvr(vector_33h : pointer) : Integer;
- { Func 1Fh }
-
- Procedure mouse_enable_drvr;
- { Func 20h }
-
- Function mouse_soft_reset(Var nbuttons : Integer ) : Integer;
- { Func 21h }
-
- (**********************************************************
- IMPLEMENTATION
- **********************************************************)
-
- Implementation
-
- {$L mouselib}
-
- Function mouse_reset(Var num_buttons : Integer) : Integer;external;
- { Func 00h }
-
- Procedure mouse_show;external;
- { Func 01h }
-
- Procedure mouse_hide;external;
- { Func 02h }
-
- Function mouse_get_pos(Var x, y : Integer) : Integer;external;
- { Func 03h }
-
- Procedure mouse_set_pos(x, y : Integer);external;
- { Func 04h }
-
- Function mouse_button_press
- (Var x, y, count : Integer; button : Integer) : Integer;external;
- { Func 05h }
-
- Function mouse_button_rel
- (Var x, y, count : Integer; button : Integer) : Integer;external;
- { Func 06h }
-
- Procedure mouse_limit_x(min_x, max_x : Integer);external;
- { Func 07h }
-
- Procedure mouse_limit_y(min_y, max_y : Integer);external;
- { Func 08h }
-
- Procedure mouse_set_graphcursor
- (xspot, yspot : Integer; masks : pointer);external;
- { Func 09h }
-
-
- Procedure mouse_set_textcursor
- (cursor_type, scr_mask, curs_mask : Integer);external;
- { Func 0Ah }
-
- Procedure mouse_get_movement(Var x, y : Integer);external;
- { 0Bh }
-
- Procedure mouse_set_eventhandler
- (event_mask : Integer; mhandler : pointer);external;
- { Func 0Ch }
-
- Procedure mouse_start_pen_emul;external;
- { Func 0Dh }
-
- Procedure mouse_stop_pen_emul;external;
- { Func 0Eh }
-
-
- Procedure mouse_set_movement_ratio(x_ratio, y_ratio : Integer);external;
- { Func 0Fh }
-
-
- Procedure mouse_conditional_off
- (left, top, right, bottom : Integer);external;
- { Func 10h }
-
- Procedure mouse_set_speed(threshold : Integer);external;
- { Func 13h }
-
-
- Function mouse_swap_vector
- (new_mask : Integer; Var old_mask : Integer; new_vector : pointer)
- : pointer;external;
- { Func 14h }
-
- Function mouse_get_bufsize : Integer;external;
- { Func 15h }
-
- Procedure mouse_save_state(state_buf : pointer);external;
- { Func 16h }
-
- Procedure mouse_restore_state(state_buf : pointer);external;
- { Func 17h }
-
-
- Procedure mouse_set_alt_handler(alt_mask : Integer; func : pointer);external;
- { Func 18h }
-
-
- Function mouse_get_alt_handler
- (alt_mask : Integer; handler : pointer) : pointer;external;
- { Func 19h }
-
-
- Procedure mouse_set_sens(x_ratio, y_ratio, threshold : Integer);external;
- { Func 1Ah }
-
-
- Procedure mouse_get_sens(Var x_ratio, y_ratio, threshold : Integer);external;
- { Func 1Bh }
-
- Procedure mouse_set_crt_page(crt_page : Integer);external;
- { Func 1Dh }
-
- Function mouse_get_crt_page : Integer;external;
- { Func 1Eh }
-
-
- Function mouse_disable_drvr(vector_33h : pointer) : Integer;external;
- { Func 1Fh }
-
- Procedure mouse_enable_drvr;external;
- { Func 20h }
-
- Function mouse_soft_reset(Var nbuttons : Integer ) : Integer;external;
- { Func 21h }
-
-
- End.
- (* MouseLib Unit *)
-